Virtio (virtual I/O or VirIO) is a type of virtualization for network and disk device drivers running on a host/hosting device where these guest drivers are aware of the fact that they are running in a virtual environment and cooperating with a hypervisor of the host to achieve high performance network and disk operations. A vhost-net module is a kernel-level backend module for interfacing with those virtio based devices that reduces virtualization overhead by moving virtio packet processing tasks out of user space and loaded into kernel space of memory of the host.
When a virtio based vhost-net module is adopted for a communication path of network packets between a virtual machine (VM) running on the host and a virtual function (VF) driver of a physical networking device, the virtio memory queues—transmission (Tx) and Rx virtio memory rings or vrings—for transmitting and receiving the network packets, respectively, are allocated in the VM's memory space, wherein allocation of the Tx and Rx vrings and their buffers are managed by virtio driver running in the VM. The VM's memory space can be managed by a VM monitor such as Qemu, which provides a layout of the VM memory to the vhost-net module so that it can directly translate the buffer addresses.
Although the vhost-net module allows the virtio back-end to be managed in the kernel, it needs a mechanism to get the packets in and out of an actual/physical network device. In some current systems, this mechanism is provided by a macvtap driver, which is a type of device driver that provides a socket that the vhost-net module can poll to receive the packets or use send calls to send the packets. On the other end, the macvtap driver associates the socket with the actual physical network device coupled to the host system, wherein the network device provides actual physical connectivity for the data packet paths between the VM and the network. However, the use of the socket and the fact the VM memory is not directly accessible by the VF driver means that Tx and Rx buffers from the VM's virtio memory rings would need to be copied into the network device's physical Tx & Rx rings. While the use of the vhost-net module reduced latency significantly, there still is substantial overhead due to the copy mechanism involved in the Tx and Rx data packet paths.
The foregoing examples of the related art and limitations related therewith are intended to be illustrative and not exclusive. Other limitations of the related art will become apparent upon a reading of the specification and a study of the drawings.